﻿using System;
using Wisdom.Core;

namespace Wisdom.Core
{
    /// <summary>
    /// 描述：运用程序初始化事件参数
    /// </summary>
    public class AppEventArgs : EventArgs
    {
        #region Public Properties
        /// <summary>
        /// 获得已使用的 <see cref="IConfigSource"/>类型对象
        /// </summary>
        public IConfigSource ConfigSource { get; private set; }
        /// <summary>
        /// 获得一个容器类 <see cref="IObjectContainer"/> 实例，来用解决注册和分解对象的依赖
        /// </summary>
        public ObjectContainer ObjectContainer { get; private set; }
        #endregion

        #region Ctor
        /// <summary>
        /// 实始化一个 <c>AppEventArgs</c> 类.
        /// </summary>
        public AppEventArgs()
            : this(null, null)
        { }
        /// <summary>
        /// 实始化一个 <c>AppEventArgs</c> 类.
        /// </summary>
        /// <param name="configSource">这个 <see cref="IConfigSource"/> 实例用来配置运用程序.</param>
        /// <param name="objectContainer">容器对象<see cref="IObjectContainer"/> 来用解决注册和分解对象的依赖</param>
        public AppEventArgs(IConfigSource configSource, ObjectContainer objectContainer)
        {
            this.ConfigSource = configSource;
            this.ObjectContainer = objectContainer;
        }
        #endregion
    }
}